import { defineStore } from 'pinia'
import { getSaveApi, getStatusApi, getLoginNameApi } from '@/api/register'

export const useRegisterStore = defineStore('register', {
    state: () => {
        return {

        }
    },

    getters: {

    },

    actions: {
        doRegister({ name, loginKey, loginName, introduction, tel, position }, address) {
            getSaveApi({ name, loginKey, loginName, introduction, tel, position, address })
        },
        // 查询注册结果 // 店铺名称查重
        checkStatus(name) {
            return getStatusApi({ name })
        },
        // 商户账号查重
        checkLoginName(loginName) {
            return getLoginNameApi({ loginName })
        }
    }
})